<?php

/**
 * EjQueryUiTheme class
 *
 * @author Julot <andy.julot@gmail.com>
 * @since Wednesday, August 10, 2011. 06:33 AM
 */
class EjQueryUiTheme {

	public static function register($theme='default') {
		$cs = Yii::app()->clientScript;
		$cs->registerCoreScript('jquery.ui');
		switch ($theme) {
			case 'default':
				$url = $cs->getCoreScriptUrl();
				$path = "$url/jui/css/base";
				break;
			default:
				$path = Yii::app()->extensionPath . "/EjQueryUiTheme/$theme/";
				$path = Yii::app()->getAssetManager()->publish($path);
				break;
		}
		$cs->registerCssFile("$path/jquery-ui.css");
	}

}
